//
//  CCPoint3D.cpp
//  bailian
//
//  Created by loading on 12-11-14.
//
//

#include "CCPoint3D.h"


CCPoint3D::CCPoint3D(void)
{
    setPoint(0.0f, 0.0f,0.0f);
}

CCPoint3D::CCPoint3D(float x, float y,float z)
{
    setPoint(x, y,z);
}

CCPoint3D::CCPoint3D(const CCPoint3D& other)
{
    setPoint(other.x, other.y,other.z);
}

CCPoint3D& CCPoint3D::operator= (const CCPoint3D& other)
{
    setPoint(other.x, other.y,other.z);
    return *this;
}

void CCPoint3D::setPoint(float x, float y,float z)
{
    this->x = x;
    this->y = y;
    this->z = z;
}

CCPoint3D* CCPoint3D::copyWithZone(CCZone* pZone)
{
    CCPoint3D* pRet = new CCPoint3D();
    pRet->setPoint(this->x, this->y,this->z);
    return pRet;
}

bool CCPoint3D::equals(const CCPoint3D& target) const
{
    return ((x == target.x) && (y == target.y) && (z == target.z));
}

bool CCPoint3D::CCPointEqualToPoint(const CCPoint3D& point1, const CCPoint3D& point2)
{
    return point1.equals(point2);
}